
var ul = document.querySelector(".content_top>.imgs");

(async function(){
    var txt = await PromiseAjax({
        url:"./php/index.php"

    })
    var ar1 = eval('(' + txt + ')')
    // 创建字符串拼接数据
    var str = ""
    ar1.forEach(item=>{
        str+=
        `
        
        <li><a href="./xiangqingye.html?id=${item.cart_id}"><img src="${item.goods_img3}" alt=""><p>查看商品详情</p></a>
        
                </li>
    
        `
    })
    // 渲染到页面中
    ul.innerHTML= str
})()
